<%@ page language="java" import="pos.domain.*,java.util.*,pos.presentation.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>PETICION REALIZADA</title>
</head>
<body>
<img src= "http://www.thepropertyexchange.com.au/images/prop-header.png" /> 

<h6>PETICION REALIZADA</h6>
<%
	String suPid = request.getParameter("suPid");
	String miPid = request.getParameter("miPid");
    Property p = new Property();
	PropertyManager pm = new PropertyManager();
	p = pm.selectProperty(suPid);
	String suEmail = p.getOwner();
 
    Exchange e = new Exchange();
    
    e.setEmailReceived(suEmail);//fallo
 	
    String miEmail = (String) session.getAttribute("session.user");
    e.setEmailSent(miEmail);
    
    e.setStartDateReceived(request.getParameter("startDateReceived"));
    e.setEndDateReceived(request.getParameter("endDateReceived"));
    e.setStartDateSent(request.getParameter("startDateSent"));
    e.setEndDateSent(request.getParameter("endDateSent"));
   
    e.setState("EnProceso");
    e.setPropertySentID(miPid);//fallo
    e.setPropertyReceivedID(suPid);//fallo
    
    new ExchangeManager().insertExchange(e); //lo meto en la bd desde aqui, llamando al exchangeManager
%>